package net.zabuchy.address.entity;

import java.io.Serializable;
import javax.persistence.*;

@Entity
@Table(name="address", catalog="quickstart")
public class Address implements Serializable {
	private static final long serialVersionUID = 1L;

	private int addressId;
	private String city;
	private String country;
	private String address1;
	private String state;
	private String zipcode;
	
    public Address() {
    }
    
    public Address(
    		String city,
    		String country,
    		String zipcode,
    		String address1,
    		String state) {
    	this.city = city;
    	this.country = country;
    	this.address1 = address1;
    	this.setState(state);
    	this.zipcode = zipcode;
    }

    @Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="ADDRESS_ID")
	public int getAddressId() {
		return this.addressId;
	}

	public void setAddressId(int addressId) {
		this.addressId = addressId;
	}

	@Column(name="CITY")
	public String getCity() {
		return this.city;
	}

	public void setCity(String city) {
		this.city = city;
	}
	
	@Column(name="COUNTRY")
	public String getCountry() {
		return this.country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	@Column(name="ADDRESS1")
	public String getAddress1() {
		return this.address1;
	}

	public void setAddress1(String address1) {
		this.address1 = address1;
	}
	
	/**
	 * @param state the state to set
	 */
	public void setState(String state) {
		this.state = state;
	}

	/**
	 * @return the state
	 */
	public String getState() {
		return state;
	}

	@Column(name="ZIPCODE")
	public String getZipcode() {
		return this.zipcode;
	}

	public void setZipcode(String zipcode) {
		this.zipcode = zipcode;
	}
	
}